/* 简化版人机验证组件样式 */

.simple-captcha {
  display: inline-block;
}

.captcha-trigger-btn {
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.captcha-trigger-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.captcha-verification-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  min-width: 300px;
}

/* 滑块验证样式 */
.slider-container {
  position: relative;
  width: 100%;
  height: 50px;
  background: #ffffff;
  border-radius: 8px;
  border: 2px solid #e5e7eb;
  overflow: hidden;
  margin-bottom: 8px;
}

.slider-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.slider-target {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 35px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 6px;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
  z-index: 1;
}

.slider-handle {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 35px;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  border-radius: 6px;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 16px;
  z-index: 2;
  transition: all 0.2s ease;
}

.slider-handle:hover {
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.slider-handle:active {
  cursor: grabbing;
  transform: translateY(-50%) scale(0.95);
}

/* 验证提示文本 */
.verification-tip {
  color: #6b7280;
  font-size: 14px;
  margin: 0;
  font-weight: 500;
  text-align: center;
}

/* 重置按钮 */
.reset-btn {
  border-radius: 6px;
  font-size: 12px;
  height: 32px;
  padding: 0 12px;
}

/* 验证成功状态 */
.verification-success {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #10b981;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
  border-radius: 8px;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.success-icon {
  font-size: 16px;
  color: #10b981;
}

/* 动画效果 */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.captcha-verification-area {
  animation: slideIn 0.3s ease-out;
}

/* 成功状态动画 */
@keyframes successPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.slider-handle.success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  animation: successPulse 0.6s ease-in-out;
}

/* 错误状态动画 */
@keyframes errorShake {
  0%, 100% {
    transform: translateY(-50%) translateX(0);
  }
  25% {
    transform: translateY(-50%) translateX(-5px);
  }
  75% {
    transform: translateY(-50%) translateX(5px);
  }
}

.slider-handle.error {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  animation: errorShake 0.4s ease-in-out;
}

/* 深色主题适配 */
[data-theme="dark"] .captcha-verification-area {
  background: #262626;
  border-color: #434343;
}

[data-theme="dark"] .slider-container {
  background: #2f2f2f;
  border-color: #434343;
}

[data-theme="dark"] .verification-tip {
  color: #bfbfbf;
}

[data-theme="dark"] .verification-success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.08) 100%);
  border-color: rgba(16, 185, 129, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .captcha-verification-area {
    min-width: 250px;
    padding: 12px;
  }
  
  .slider-container {
    height: 45px;
  }
  
  .slider-handle,
  .slider-target {
    width: 45px;
    height: 32px;
  }
  
  .verification-tip {
    font-size: 13px;
  }
} 